// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             v4.23.4
// source: ConfigSync.proto

package proto

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

const (
	ConfigSync_Ping_FullMethodName          = "/proto.ConfigSync/Ping"
	ConfigSync_Sync_FullMethodName          = "/proto.ConfigSync/Sync"
	ConfigSync_LastUpdate_FullMethodName    = "/proto.ConfigSync/LastUpdate"
	ConfigSync_GetScopes_FullMethodName     = "/proto.ConfigSync/GetScopes"
	ConfigSync_GetTemplates_FullMethodName  = "/proto.ConfigSync/GetTemplates"
	ConfigSync_GetNamespaces_FullMethodName = "/proto.ConfigSync/GetNamespaces"
	ConfigSync_GetTriggers_FullMethodName   = "/proto.ConfigSync/GetTriggers"
)

// ConfigSyncClient is the client API for ConfigSync service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
//go:generate go run github.com/vektra/mockery/v2@v2.20.2 --name=ConfigSyncClient
type ConfigSyncClient interface {
	Ping(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*EmptyMessage, error)
	Sync(ctx context.Context, in *UpdateConfigEvent, opts ...grpc.CallOption) (*EmptyMessage, error)
	LastUpdate(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*ServerTime, error)
	GetScopes(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*Scopes, error)
	GetTemplates(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*Templates, error)
	GetNamespaces(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*Namespaces, error)
	GetTriggers(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*Triggers, error)
}

type configSyncClient struct {
	cc grpc.ClientConnInterface
}

func NewConfigSyncClient(cc grpc.ClientConnInterface) ConfigSyncClient {
	return &configSyncClient{cc}
}

func (c *configSyncClient) Ping(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*EmptyMessage, error) {
	out := new(EmptyMessage)
	err := c.cc.Invoke(ctx, ConfigSync_Ping_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *configSyncClient) Sync(ctx context.Context, in *UpdateConfigEvent, opts ...grpc.CallOption) (*EmptyMessage, error) {
	out := new(EmptyMessage)
	err := c.cc.Invoke(ctx, ConfigSync_Sync_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *configSyncClient) LastUpdate(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*ServerTime, error) {
	out := new(ServerTime)
	err := c.cc.Invoke(ctx, ConfigSync_LastUpdate_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *configSyncClient) GetScopes(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*Scopes, error) {
	out := new(Scopes)
	err := c.cc.Invoke(ctx, ConfigSync_GetScopes_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *configSyncClient) GetTemplates(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*Templates, error) {
	out := new(Templates)
	err := c.cc.Invoke(ctx, ConfigSync_GetTemplates_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *configSyncClient) GetNamespaces(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*Namespaces, error) {
	out := new(Namespaces)
	err := c.cc.Invoke(ctx, ConfigSync_GetNamespaces_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *configSyncClient) GetTriggers(ctx context.Context, in *EmptyMessage, opts ...grpc.CallOption) (*Triggers, error) {
	out := new(Triggers)
	err := c.cc.Invoke(ctx, ConfigSync_GetTriggers_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ConfigSyncServer is the server API for ConfigSync service.
// All implementations must embed UnimplementedConfigSyncServer
// for forward compatibility
//
//go:generate go run github.com/vektra/mockery/v2@v2.20.2 --name=ConfigSyncServer
type ConfigSyncServer interface {
	Ping(context.Context, *EmptyMessage) (*EmptyMessage, error)
	Sync(context.Context, *UpdateConfigEvent) (*EmptyMessage, error)
	LastUpdate(context.Context, *EmptyMessage) (*ServerTime, error)
	GetScopes(context.Context, *EmptyMessage) (*Scopes, error)
	GetTemplates(context.Context, *EmptyMessage) (*Templates, error)
	GetNamespaces(context.Context, *EmptyMessage) (*Namespaces, error)
	GetTriggers(context.Context, *EmptyMessage) (*Triggers, error)
	mustEmbedUnimplementedConfigSyncServer()
}

// UnimplementedConfigSyncServer must be embedded to have forward compatible implementations.
type UnimplementedConfigSyncServer struct {
}

func (UnimplementedConfigSyncServer) Ping(context.Context, *EmptyMessage) (*EmptyMessage, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
}
func (UnimplementedConfigSyncServer) Sync(context.Context, *UpdateConfigEvent) (*EmptyMessage, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented")
}
func (UnimplementedConfigSyncServer) LastUpdate(context.Context, *EmptyMessage) (*ServerTime, error) {
	return nil, status.Errorf(codes.Unimplemented, "method LastUpdate not implemented")
}
func (UnimplementedConfigSyncServer) GetScopes(context.Context, *EmptyMessage) (*Scopes, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetScopes not implemented")
}
func (UnimplementedConfigSyncServer) GetTemplates(context.Context, *EmptyMessage) (*Templates, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetTemplates not implemented")
}
func (UnimplementedConfigSyncServer) GetNamespaces(context.Context, *EmptyMessage) (*Namespaces, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetNamespaces not implemented")
}
func (UnimplementedConfigSyncServer) GetTriggers(context.Context, *EmptyMessage) (*Triggers, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetTriggers not implemented")
}
func (UnimplementedConfigSyncServer) mustEmbedUnimplementedConfigSyncServer() {}

// UnsafeConfigSyncServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ConfigSyncServer will
// result in compilation errors.
type UnsafeConfigSyncServer interface {
	mustEmbedUnimplementedConfigSyncServer()
}

func RegisterConfigSyncServer(s grpc.ServiceRegistrar, srv ConfigSyncServer) {
	s.RegisterService(&ConfigSync_ServiceDesc, srv)
}

func _ConfigSync_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EmptyMessage)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ConfigSyncServer).Ping(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ConfigSync_Ping_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ConfigSyncServer).Ping(ctx, req.(*EmptyMessage))
	}
	return interceptor(ctx, in, info, handler)
}

func _ConfigSync_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateConfigEvent)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ConfigSyncServer).Sync(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ConfigSync_Sync_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ConfigSyncServer).Sync(ctx, req.(*UpdateConfigEvent))
	}
	return interceptor(ctx, in, info, handler)
}

func _ConfigSync_LastUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EmptyMessage)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ConfigSyncServer).LastUpdate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ConfigSync_LastUpdate_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ConfigSyncServer).LastUpdate(ctx, req.(*EmptyMessage))
	}
	return interceptor(ctx, in, info, handler)
}

func _ConfigSync_GetScopes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EmptyMessage)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ConfigSyncServer).GetScopes(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ConfigSync_GetScopes_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ConfigSyncServer).GetScopes(ctx, req.(*EmptyMessage))
	}
	return interceptor(ctx, in, info, handler)
}

func _ConfigSync_GetTemplates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EmptyMessage)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ConfigSyncServer).GetTemplates(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ConfigSync_GetTemplates_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ConfigSyncServer).GetTemplates(ctx, req.(*EmptyMessage))
	}
	return interceptor(ctx, in, info, handler)
}

func _ConfigSync_GetNamespaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EmptyMessage)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ConfigSyncServer).GetNamespaces(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ConfigSync_GetNamespaces_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ConfigSyncServer).GetNamespaces(ctx, req.(*EmptyMessage))
	}
	return interceptor(ctx, in, info, handler)
}

func _ConfigSync_GetTriggers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(EmptyMessage)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ConfigSyncServer).GetTriggers(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ConfigSync_GetTriggers_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ConfigSyncServer).GetTriggers(ctx, req.(*EmptyMessage))
	}
	return interceptor(ctx, in, info, handler)
}

// ConfigSync_ServiceDesc is the grpc.ServiceDesc for ConfigSync service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ConfigSync_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.ConfigSync",
	HandlerType: (*ConfigSyncServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Ping",
			Handler:    _ConfigSync_Ping_Handler,
		},
		{
			MethodName: "Sync",
			Handler:    _ConfigSync_Sync_Handler,
		},
		{
			MethodName: "LastUpdate",
			Handler:    _ConfigSync_LastUpdate_Handler,
		},
		{
			MethodName: "GetScopes",
			Handler:    _ConfigSync_GetScopes_Handler,
		},
		{
			MethodName: "GetTemplates",
			Handler:    _ConfigSync_GetTemplates_Handler,
		},
		{
			MethodName: "GetNamespaces",
			Handler:    _ConfigSync_GetNamespaces_Handler,
		},
		{
			MethodName: "GetTriggers",
			Handler:    _ConfigSync_GetTriggers_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "ConfigSync.proto",
}
